package org.sport.dbInterface;

import org.sport.model.entityModel.LinkmantableEntity;
import org.sport.model.entityModel.UsertableEntity;

import java.util.List;

/**
 * Created by Allen on 2017/9/20.
 */
public interface LinManOperation {

    /**
    * 增
    *  @param:  拥有者id
    *  @param:  联系人id
    * */
    boolean         addOneLinkMan(UsertableEntity ownerId,UsertableEntity linkMan);

    /**
    * 改     改备注？有需求再加
    * */
    boolean         updateOne();
    /*
    * 删
    * */
    boolean         del(UsertableEntity ownerId,UsertableEntity linkMan);

    /*
    * 查
    * */
    LinkmantableEntity findOneLinkMan(UsertableEntity ownerId,UsertableEntity linkMan);

    /**
     * 查找一个user的所有联系人
     * @param ownerId
     * @return
     */
    List<UsertableEntity> findUserLinkMan(UsertableEntity ownerId);

    List<UsertableEntity> findAllLinkMan();
}
